package com.example.human_resource_management.mapper;

import com.example.human_resource_management.entry.dto.SalaryEmployeeDto;
import com.example.human_resource_management.entry.po.Salary;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【salary(薪资表)】的数据库操作Mapper
* @createDate 2025-06-09 14:32:19
* @Entity com.example.human_resource_management.entry.po.Salary
*/
public interface SalaryMapper extends BaseMapper<Salary> {
    @Select("SELECT e.emp_id, e.name, s.month, s.base_salary, s.performance, s.deduction, s.actual_pay " +
            "FROM employee e " +
            "JOIN salary s ON e.emp_id = s.emp_id")
    List<SalaryEmployeeDto> selectSalaryEmployeeList();
}




